12.7.
public class Pingali {
  public static void main(String[] args) {
    int number = (int)Math.round(Math.random() * 10);
    switch (number % 2) {
      case 0:
        System.out.println(number + ", is even");
        break;
      case 1:
        System.out.println(number + ", is odd");
    }
  }
}

---------------------------------

public class Shanmugasundaram {
  public static boolean andOp (boolean x, boolean y) {
    if (x)
      return y;
    else
      return false;
  }
}

---------------------------------

switch (test) {
  case 'a':
    System.out.println("You did great!");
    break;
  case 'b':
    System.out.println("You did well!");
    break;
  case 'c':
    System.out.println("You passed!");
    break;
  case 'd':
    System.out.println("Well, you didn't fail!");
    break;
  default:
    System.out.println("Mission Control, we've got problems");
}


12.10.
public class deconticativen {
  public static void main(String[] args) {
    for (char char1 = 'a', char2 = 'n'; char1 <= 'm'; char1++, char2++) {
      System.out.println(char1 + " " + char2);
    }
  }
}

public class mounfossing {
  public static void main(String[] args) {
    char char1 = 'a', char2 = 'n';
    while (char1 <= 'm') {
      System.out.println(char1 + " " + char2);
      char1++;
      char2++;
    }
  }
}


12.12
The value of 'j' can be printed since it was declared within the same block as the print statement, 
but the value of 'i' cannot be accessed because its scope is limited to the 'for' block.